package com.day20me.test;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class Tset1 {
    public static void main(String[] args) {

        Map<String,String> map = new HashMap<>();

        map.put("Name","Tom");
        map.put("Age","天山童姥");

        Iterator<String> iter = map.keySet().iterator();

        while (iter.hasNext()){
            String value = map.get(iter.next());
            System.out.println(value);
        }
        for(String key:map.keySet()){
            String value = map.get(key);
            System.out.println(value);
        }
    }
}
